package com.xingdata.jjxc.enty;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.xingdata.jjxc.utils.callback.IJsontoOp;
import com.xingdata.jjxc.utils.database.Column;

public class NaviHistoryEntity implements ITableEntity, IJsontoOp, Serializable {
	private static final long serialVersionUID = 1L;
	/**
	 * 导航历史记录
	 */
	public static String _TableName = "E_navi_history";
	private String user_id; // 用户id
	private String loca_id; // 主键
	private String loca_nickname; // 自定义地址名字
	private String loca_areaid; // 地区id
	private String loca_address; // 详细地址
	private String loca_lng; // 经度
	private String loca_lat; // 纬度
	private String create_time; // 创建时间

	public String getuser_id() {
		return user_id;
	}

	public void setuser_id(String user_id) {
		this.user_id = user_id;
	}

	public String getloca_id() {
		return loca_id;
	}

	public void setloca_id(String loca_id) {
		this.loca_id = loca_id;
	}

	/** 地名 */
	public String getloca_nickname() {
		return loca_nickname;
	}

	/** 地名 */
	public void setloca_nickname(String loca_nickname) {
		this.loca_nickname = loca_nickname;
	}
	
	/** 地址 */
	public String getloca_address() {
		return loca_address;
	}

	/** 地址 */
	public void setloca_address(String loca_address) {
		this.loca_address = loca_address;
	}

	public String getloca_areaid() {
		return loca_areaid;
	}

	public void setloca_areaid(String loca_areaid) {
		this.loca_areaid = loca_areaid;
	}

	/**经度*/
	public String getloca_lng() {
		return loca_lng;
	}

	/**经度*/
	public void setloca_lng(String loca_lng) {
		this.loca_lng = loca_lng;
	}

	/**纬度*/
	public String getloca_lat() {
		return loca_lat;
	}

	/**纬度*/
	public void setloca_lat(String loca_lat) {
		this.loca_lat = loca_lat;
	}

	public String getcreate_time() {
		return create_time;
	}

	public void setcreate_time(String create_time) {
		this.create_time = create_time;
	}

	@Override
	public IJsontoOp GetOb(Map<String, Object> map) {
		return null;
	}

	@Override
	public List<Column> GetColumns() {
		List<Column> objColumnList = new ArrayList<Column>();
		Column objColumn = null;

		objColumn = new Column();
		objColumn.setColumnName(ColumnName.loca_id);
		objColumn.setColumnType(ColumnType.String);
		objColumn.setIsAutoIncrement(false);
		objColumn.setIsPrimaryKey(true);
		objColumn.setMaxLength(999999999);
		objColumn.setMinLength(0);
		objColumnList.add(objColumn);

		String[] columnNames = { ColumnName.user_id,
				ColumnName.loca_address, ColumnName.loca_areaid,
				ColumnName.loca_lat, ColumnName.loca_lng,
				ColumnName.loca_nickname, ColumnName.create_time };
		for (int i = 0; i < columnNames.length; i++) {
			objColumn = new Column();
			objColumn.setColumnName(columnNames[i]);
			objColumn.setColumnType(ColumnType.String);
			objColumn.setIsAutoIncrement(false);
			objColumn.setIsPrimaryKey(false);
			objColumn.setMaxLength(999999999);
			objColumn.setMinLength(0);
			objColumnList.add(objColumn);
		}
		return objColumnList;
	}

	@Override
	public String GetTableName() {
		return _TableName;
	}

	public class ColumnName {
		public static final String user_id = "user_id"; // 用户id
		public static final String loca_id = "loca_id"; // 主键
		public static final String loca_nickname = "loca_nickname"; // 自定义地址名字
		public static final String loca_areaid = "loca_areaid"; // 地区id
		public static final String loca_address = "loca_address"; // 详细地址
		public static final String loca_lng = "loca_lng"; // 经度
		public static final String loca_lat = "loca_lat"; // 纬度
		public static final String create_time = "create_time"; // 创建时间
	}

}
